<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>门诊</title>
	</head>
	<body>
	</body>
</html>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />

		<link rel="stylesheet" href="css/jb.css">
		<!-- 必须先引入vue，  后使用element-ui -->
		<script type="text/javascript" src="/admin/js-css/js/vue.min.js"></script>

		<script type="text/javascript" src="/admin/js-css/js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="/admin/js-css/js/mx1.0.js?v=1.1.1"></script>

		<script src="js/print.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<div class="box">
				<div class="item">
					<div class="tel">咨询电话：{{formData.zxdh}}</span>
					</div>
					
				</div>
                <div class="item">
                	<div class="name">{{formData.xm}}</div>
                	<div class="sex">{{formData.xb}}</div>
                	<div class="class">{{formData.cblb}}</div>
                	<div class="idcard">{{formData.shbzh}}</div>
                	<div class="dw">{{formData.fzdw}}</div>
                	<div class="time">
                		<span class="year">{{year}}</span>
                		<span class="month">{{yue}}</span>
                		<span class="date">{{day}}</span>
                	</div>
                </div>


			</div>
		</div>
	</body>
	<script>
		var vm = new Vue({
			el: "#app",
			data: {
				parmsData:{},
				formData:{},
				year:"",
				yue:"",
				day:"",
			},
			created(){
				this.parmsData = getParams();
				this.loadData();
			},
			methods: {
				hdprint() {
					window.print();
				},
				//加载数据
				async loadData(){
					const res = await listAdmin(getTableId("1077"),"id",{"id":this.parmsData.id});
					this.formData = res.data[0];
					this.year = this.formData.rq.split("-")[0];
					this.yue = this.formData.rq.split("-")[1];
					this.day = this.formData.rq.split("-")[2];

				}
			}

		})
	</script>
</html>
